//
//  HomeTipsCell.swift
//  NDAi
//
//  Created by 丸子 on 2024/6/4.
//

import UIKit

class HomeTipsHeaderView: UIView {
    private lazy var backView: UIView = {
       let view = UIView()
        view.backgroundColor = .clear
        return view
    }()
    
    private lazy var bgIV:UIImageView = {
       let view = UIImageView()
        view.image = UIImage(named: "icon_home_bg")
        return view
    }()
    
    private lazy var contentLb: UILabel = {
       let label = UILabel()
        label.font = UIFont.pingFangSCRegular(ofSize: 14)
        label.textColor = Theme.color.text_d1
        label.text = "Hi, 有问题就快来问我吧"
        label.numberOfLines = 2
        return label
    }()
    
    private lazy var messageIV:UIImageView = {
       let view = UIImageView()
        view.image = UIImage(named: "icon_home_msgts")
        view.isHidden = true
        return view
    }()
    
    private lazy var moreIV:UIImageView = {
       let view = UIImageView()
        view.image = UIImage(named: "icon_Mine_更多")
        view.isHidden = true
        return view
    }()
    
    override init(frame: CGRect) {
        super.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: 54))
        self.backgroundColor = .clear
        addSubviews([backView])
        backView.addSubviews([bgIV, contentLb, messageIV, moreIV])
        backView.snp.makeConstraints { make in
            make.leading.trailing.equalToSuperview().inset(16)
            make.height.equalTo(44)
            make.bottom.equalToSuperview()
            make.top.equalToSuperview().offset(5)
        }
        bgIV.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
        
        moreIV.snp.makeConstraints { make in
            make.trailing.equalToSuperview().offset(-10)
            make.centerY.equalToSuperview()
            make.width.equalTo(4)
            make.height.equalTo(8)
        }
        
        messageIV.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.trailing.equalTo(moreIV.snp.leading).offset(-6)
            make.width.equalTo(41)
            make.height.equalTo(30)
        }
        
        contentLb.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.leading.equalTo(16)
            make.trailing.equalTo(messageIV.snp.leading).offset(-30)
        }
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
